const normalMixin = {
    props: {
        option: {
            type: Object,
            required: true
        },
        index: {
            type: Number,
            required: true
        }
    },
    methods: {
        // blur 事件处理
        blurSearchItem(option, index, $event) {
            if ($event) return false;
            this.$nextTick(() => {
                if ((Array.isArray(option.value) && option.value.length) || (!Array.isArray(option.value) && option.value) || (Number.isFinite(option.value))) {
                    option.inUse = false;
                } else { // 无任何操作行为
                    this.$emit('noActions', index);
                }
                this.$emit('handleCloseSearch');
            })
        }
    },
    mounted() {
        this.$emit('load', this.option.name);
    }
}
export default normalMixin;